﻿@using DataMongo
@using MVCMongo.Services
@model IEnumerable<DataMongo.Entities.Album>


@{
    ViewBag.Title = "Album";
    
}
<script src="~/Content/UserProfile/js/plugins/colorbox/jquery.colorbox-min.js"></script>
<link href="~/Content/UserProfile/css/plugins/colorbox/colorbox.css" rel="stylesheet" />
<div class="container-fluid">
    <div class="row-fluid">
        <div class="span12">
            <div class="box box-bordered ">
                <div class="box-title">
                    <h3 style="width: 100%">
                        <i class="icon-user"></i>
                        Albums
                        <span class="pull-right">
                            <a href="@Url.Action("AlbumAdd","Album")">Create Album</a>
                        </span>
                    </h3>



                </div>



                <div class="box-content">
                    <ul class="gallery ">
                        @foreach (var item in Model)
                    {
                        var img = "";
                        var imageUrl = UtilityService.GetImageByAlbumId(item.AlbumId);
                        if (!string.IsNullOrEmpty(imageUrl))
                        {
                            img = "/" + item.AlbumId + "/" + imageUrl;

                        }

                            <li>


                                <a href="#">
                                    <img src="/Content/UserProfile/UserUploadedPic/Albums/@img" width="300px" height="300px" alt=""><br /><br />
                                </a>

                                <div class="extras" style="color: white !important ; background: none !important; height: 0 !important;">
                                    <div class="extras-inner">
                                        <h5 style="color: white !important; border-bottom: 1px solid">
                                            <a href="@Url.Action("AlbumDetails","Album",new{Id=@item.AlbumId})" style="color: white !important">        @item.Name</a>

                                            <a class="pull-right" style="color: white !important" title="Edit" href="@Url.Action("AlbumEdit","Album",new{Id=item.AlbumId})"><i class="icon-edit"></i></a>
                                        </h5>
                                        <a style="color: white !important" title="Details" href="/Content/UserProfile/UserUploadedPic/Albums/@img" class='colorbox-image' rel="group-1"><i class="icon-th"></i></a>

                                        <a style="color: white !important" title="Like" href="#"><i class="glyphicon-thumbs_up"></i></a>

                                        <a style="color: white !important" title="Delete" href="#"><i class="icon-box"></i></a>
                                    </div>
                                </div>
                            </li>
                    }
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>